import 'package:flutterproject/generated/json/base/json_convert_content.dart';
import 'package:flutterproject/page/mine/data/my_assets_bean.dart';

MyAssetsBean $MyAssetsBeanFromJson(Map<String, dynamic> json) {
	final MyAssetsBean myAssetsBean = MyAssetsBean();
	final List<MyAssetsList>? list = jsonConvert.convertListNotNull<MyAssetsList>(json['list']);
	if (list != null) {
		myAssetsBean.list = list;
	}
	final double? totalAmount = jsonConvert.convert<double>(json['totalAmount']);
	if (totalAmount != null) {
		myAssetsBean.totalAmount = totalAmount;
	}
	return myAssetsBean;
}

Map<String, dynamic> $MyAssetsBeanToJson(MyAssetsBean entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['list'] =  entity.list?.map((v) => v.toJson()).toList();
	data['totalAmount'] = entity.totalAmount;
	return data;
}

MyAssetsList $MyAssetsListFromJson(Map<String, dynamic> json) {
	final MyAssetsList myAssetsList = MyAssetsList();
	final double? amount = jsonConvert.convert<double>(json['amount']);
	if (amount != null) {
		myAssetsList.amount = amount;
	}
	final double? balance = jsonConvert.convert<double>(json['balance']);
	if (balance != null) {
		myAssetsList.balance = balance;
	}
	final double? frozen = jsonConvert.convert<double>(json['frozen']);
	if (frozen != null) {
		myAssetsList.frozen = frozen;
	}
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		myAssetsList.id = id;
	}
	final int? type = jsonConvert.convert<int>(json['type']);
	if (type != null) {
		myAssetsList.type = type;
	}
	return myAssetsList;
}

Map<String, dynamic> $MyAssetsListToJson(MyAssetsList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['amount'] = entity.amount;
	data['balance'] = entity.balance;
	data['frozen'] = entity.frozen;
	data['id'] = entity.id;
	data['type'] = entity.type;
	return data;
}